#include<bits/stdc++.h>
using namespace std;
const double M_PI=atan(1.0)*4;
int main()
{
    cout<<pow(1.2,10)<<endl;
    cout<<log(123)<<endl;//ln(123)
    cout<<log10(123)<<endl;
    cout<<ceil(M_PI)<<endl;
    cout<<floor(M_PI)<<endl;


    int n;//n=123
    cin>>n;
    cout<<"last Digit="<<n%10<<endl;

    double lg=log10(n);
    lg=lg-(int)lg+1;
    lg=pow(10,lg);
    cerr<<lg<<endl;

    cout<<"first Digit="<<(int)lg<<endl;
    return 0;
}